package com.dragon.modules.yuegou.model.member;

import com.dragon.modules.yuegou.entity.member.MemberEntity;
import com.dragon.modules.yuegou.enums.member.MemberGender;
import com.dragon.modules.yuegou.enums.member.MemberSource;
import com.dragon.modules.yuegou.enums.member.MemberStatus;
import com.dragon.modules.yuegou.model.park.PlateNo;
import io.swagger.annotations.ApiModelProperty;
import org.apache.commons.lang3.StringUtils;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.List;

/**
 * 会员信息模型类
 * 
 * @author pbuilder generated
 * @date 2019-03-20 10:13:14
 * @company sgy
 * @version 2.0
 * @see Length 长度限制
 * @see NotNull 对象非空
 * @see NotEmpty 字符串、集合、表、数组非空
 */
public class Member extends MemberEntity {

	@ApiModelProperty(value = "微信openid", required = false)
	private String wxOpenId;

	@ApiModelProperty("微信unionid")
	private String wxUnionId;

	@ApiModelProperty(value = "支付宝APPid", required = false)
	private String alipayAppid;

	@ApiModelProperty("上次获取时间")
	private LocalDate requestLoginTime;

	@ApiModelProperty(value = "商圈ID", required = true)
	private String busdId;

	@ApiModelProperty("会员等级")
	private String levelName;//会员等级

	@ApiModelProperty("剩余积分")
	private Integer memPoints;//剩余积分

	@ApiModelProperty("悦卡余额")
	private BigDecimal yueCardCoin;//悦卡余额

	@ApiModelProperty("悦币余额")
	private BigDecimal yueCoin;//悦币余额

	@ApiModelProperty("优惠券数量")
	private Integer couponNum;

	@ApiModelProperty("车牌信息")
	private List<PlateNo> carList;//车牌信息

	@ApiModelProperty("豪气值")
	private BigDecimal richVal;//豪气值

	@ApiModelProperty(value = "验证码", required = true)
	private String vcode;
	
	@ApiModelProperty("是否互相关注")
	private Boolean mutual;

	@ApiModelProperty("动态")
	private Integer weblogNum;

	@ApiModelProperty("关注数量")
	private Integer followNum;

	@ApiModelProperty("粉丝数量")
	private Integer fansNum;

	@ApiModelProperty("获赞数量")
	private Integer gainLikeNum;

	@ApiModelProperty("商圈会员创建时间")
	private LocalDateTime busdMemberCreatedTime;

	@ApiModelProperty("累计积分")
	private Integer historyPoints;//剩余积分

	@ApiModelProperty("出生日期")
	private LocalDate birthday;//出生日期

	@ApiModelProperty("年龄")
	private Integer age;

	@ApiModelProperty("当前会员成长值")
	private Long growCount;

	@ApiModelProperty("会员标识")
	private String memIdentity;
	
	@ApiModelProperty("线上积分")
	private Integer onlinePoints;
	
	@ApiModelProperty("线上积分")
	private Integer totalPoints;

	@ApiModelProperty("是否有新消息")
	private Boolean hasNewMessage;

	@ApiModelProperty("是否有密码")
	private Boolean hasLoginPwd;

	@ApiModelProperty("是否新会员")
	private Boolean newMember;

	@ApiModelProperty("[枚举]会员属性：0-APP和小程序都未登陆过、1-登陆过小程序、2-APP和小程序都登陆过")
	private Integer memberAttribute;

	public String getMemIdentity() {
		return memIdentity;
	}

	public void setMemIdentity(String memIdentity) {
		this.memIdentity = memIdentity;
	}

	public Long getGrowCount() {
		return growCount;
	}

	public void setGrowCount(Long growCount) {
		this.growCount = growCount;
	}

	public Integer getAge() {
		return age;
	}

	public void setAge(Integer age) {
		this.age = age;
	}

	public LocalDate getRequestLoginTime() {
		return requestLoginTime;
	}

	public void setRequestLoginTime(LocalDate requestLoginTime) {
		this.requestLoginTime = requestLoginTime;
	}

	public Integer getHistoryPoints() {
		return historyPoints;
	}

	public void setHistoryPoints(Integer historyPoints) {
		this.historyPoints = historyPoints;
	}
	
	public LocalDate getBirthday() {
		return birthday;
	}

	public void setBirthday(LocalDate birthday) {
		this.birthday = birthday;
	}

	public Integer getWeblogNum() {
		return weblogNum;
	}

	public void setWeblogNum(Integer weblogNum) {
		this.weblogNum = weblogNum;
	}

	public Integer getFollowNum() {
		return followNum;
	}

	public void setFollowNum(Integer followNum) {
		this.followNum = followNum;
	}

	public Integer getFansNum() {
		return fansNum;
	}

	public void setFansNum(Integer fansNum) {
		this.fansNum = fansNum;
	}

	public Integer getGainLikeNum() {
		return gainLikeNum;
	}

	public void setGainLikeNum(Integer gainLikeNum) {
		this.gainLikeNum = gainLikeNum;
	}


	public Boolean getMutual() {
		return mutual;
	}

	public void setMutual(Boolean mutual) {
		this.mutual = mutual;
	}

	public LocalDateTime getBusdMemberCreatedTime() {
		return busdMemberCreatedTime;
	}

	public void setBusdMemberCreatedTime(LocalDateTime busdMemberCreatedTime) {
		this.busdMemberCreatedTime = busdMemberCreatedTime;
	}

	public Boolean getHasLoginPwd() {
		return StringUtils.isNotEmpty(this.getPassword());
	}

	public void setHasLoginPwd(Boolean hasLoginPwd) {
		this.hasLoginPwd = hasLoginPwd;
	}

	public Boolean getNewMember() {
		return newMember;
	}

	public void setNewMember(Boolean newMember) {
		this.newMember = newMember;
	}

	/**
	 * 构造一个空会员信息模型对象
	 */
	public Member(){
		super();
	}
	
	/**
	 * 依据实体对象的信息构造一个会员信息模型对象
	 * 
	 * @param entity 实体对象
	 */
	public Member(MemberEntity entity){
		super(entity);
	}

	/**
	 * 依据其它对象的信息构造一个会员信息模型对象
	 * 
	 * @param other 其它对象
	 */
	public Member(Member other){
		super(other);
	}


	@Override
	public String getId() {
    	return id;
    }
	
    /**
	 * 设置
	 * 
	 * @param id 
	 * @return 当前对象
	 */
    public Member id(String id) {
    	this.id = id;
    	return this;
    }

	@Override
	public String getLoginName() {
    	return loginName;
    }

    /**
	 * 设置登录用户名(外部用户自动生成用户信息时使用)
	 * 
	 * @param loginName 登录用户名(外部用户自动生成用户信息时使用)
	 * @return 当前对象
	 */
    public Member loginName(String loginName) {
    	this.loginName = loginName;
    	return this;
    }

	@Override
	public String getMobile() {
    	return mobile;
    }

    /**
	 * 设置绑定的手机号码
	 * 
	 * @param mobile 绑定的手机号码
	 * @return 当前对象
	 */
    public Member mobile(String mobile) {
    	this.mobile = mobile;
    	return this;
    }

	@Override
	public String getPassword() {
    	return password;
    }

    /**
	 * 设置密码
	 * 
	 * @param password 密码
	 * @return 当前对象
	 */
    public Member password(String password) {
    	this.password = password;
    	return this;
    }

	@Override
	public String getNickName() {
    	return nickName;
    }

    /**
	 * 设置昵称
	 * 
	 * @param nickName 昵称
	 * @return 当前对象
	 */
    public Member nickName(String nickName) {
    	this.nickName = nickName;
    	return this;
    }

	public BigDecimal getRichVal() {
		return richVal;
	}

	public void setRichVal(BigDecimal richVal) {
		this.richVal = richVal;
	}

	@Override
	public String getHeadImg() {
    	return headImg;
    }

    /**
	 * 设置头像地址
	 * 
	 * @param headImg 头像地址
	 * @return 当前对象
	 */
    public Member headImg(String headImg) {
    	this.headImg = headImg;
    	return this;
    }

	@Override
	public Integer getHeadLevel() {
    	return headLevel;
    }

    /**
	 * 设置
	 * 
	 * @param headLevel 
	 * @return 当前对象
	 */
    public Member headLevel(Integer headLevel) {
    	this.headLevel = headLevel;
    	return this;
    }

	@Override
	public String getRealName() {
    	return realName;
    }

    /**
	 * 设置真实姓名
	 * 
	 * @param realName 真实姓名
	 * @return 当前对象
	 */
    public Member realName(String realName) {
    	this.realName = realName;
    	return this;
    }

	@Override
	public MemberGender getGender() {
    	return gender;
    }

    /**
	 * 设置[枚举]性别：0-未知-UNKNOWN、1-男-MALE、2-女-FEMALE
	 * 
	 * @param gender [枚举]性别：0-未知-UNKNOWN、1-男-MALE、2-女-FEMALE
	 * @return 当前对象
	 */
    public Member gender(MemberGender gender) {
    	this.gender = gender;
    	return this;
    }

	@Override
	public LocalDate getBirthDate() {
    	return birthDate;
    }

    /**
	 * 设置
	 * 
	 * @param birthDate 
	 * @return 当前对象
	 */
    public Member birthDate(LocalDate birthDate) {
    	this.birthDate = birthDate;
    	return this;
    }

	@Override
	public String getAgeGroup() {
    	return ageGroup;
    }

    /**
	 * 设置年龄段
	 * 
	 * @param ageGroup 年龄段
	 * @return 当前对象
	 */
    public Member ageGroup(String ageGroup) {
    	this.ageGroup = ageGroup;
    	return this;
    }

	@Override
	public MemberSource getSource() {
    	return source;
    }

    /**
	 * 设置[枚举]来源：1-微信-WECHAT、2-安卓-ANDROID、3-IOS-IOS、4-小程序-MINI、5-网页-WEB、6-后台导入-CRM、7-大大工匠导入-DDGJ
	 * 
	 * @param source [枚举]来源：1-微信-WECHAT、2-安卓-ANDROID、3-IOS-IOS、4-小程序-MINI、5-网页-WEB、6-后台导入-CRM、7-大大工匠导入-DDGJ
	 * @return 当前对象
	 */
    public Member source(MemberSource source) {
    	this.source = source;
    	return this;
    }

	@Override
	public MemberStatus getStatus() {
    	return status;
    }

    /**
	 * 设置[枚举]状态：0-未激活-INACTIVE、1-已启用-ENABLED、2-禁用-DISABLED
	 * 
	 * @param status [枚举]状态：0-未激活-INACTIVE、1-已启用-ENABLED、2-禁用-DISABLED
	 * @return 当前对象
	 */
    public Member status(MemberStatus status) {
    	this.status = status;
    	return this;
    }

	@Override
	public String getSignature() {
    	return signature;
    }

    /**
	 * 设置签名
	 * 
	 * @param signature 签名
	 * @return 当前对象
	 */
    public Member signature(String signature) {
    	this.signature = signature;
    	return this;
    }

	@Override
	public String getCityCode() {
    	return cityCode;
    }

    /**
	 * 设置城市编码
	 * 
	 * @param cityCode 城市编码
	 * @return 当前对象
	 */
    public Member cityCode(String cityCode) {
    	this.cityCode = cityCode;
    	return this;
    }

	@Override
	public String getAddress() {
    	return address;
    }

    /**
	 * 设置地址
	 * 
	 * @param address 地址
	 * @return 当前对象
	 */
    public Member address(String address) {
    	this.address = address;
    	return this;
    }

	@Override
	public String getJpushRegId() {
    	return jpushRegId;
    }

    /**
	 * 设置极光推送用户ID
	 * 
	 * @param jpushRegId 极光推送用户ID
	 * @return 当前对象
	 */
    public Member jpushRegId(String jpushRegId) {
    	this.jpushRegId = jpushRegId;
    	return this;
    }

	@Override
	public LocalDateTime getCreatedTime() {
    	return createdTime;
    }

    /**
	 * 设置
	 * 
	 * @param createdTime 
	 * @return 当前对象
	 */
    public Member createdTime(LocalDateTime createdTime) {
    	this.createdTime = createdTime;
    	return this;
    }

	@Override
	public String getCreatedBy() {
    	return createdBy;
    }

    /**
	 * 设置
	 * 
	 * @param createdBy 
	 * @return 当前对象
	 */
    public Member createdBy(String createdBy) {
    	this.createdBy = createdBy;
    	return this;
    }

	@Override
	public LocalDateTime getModifiedTime() {
    	return modifiedTime;
    }

    /**
	 * 设置
	 * 
	 * @param modifiedTime 
	 * @return 当前对象
	 */
    public Member modifiedTime(LocalDateTime modifiedTime) {
    	this.modifiedTime = modifiedTime;
    	return this;
    }

	@Override
	public String getModifiedBy() {
    	return modifiedBy;
    }

    /**
	 * 设置
	 * 
	 * @param modifiedBy 
	 * @return 当前对象
	 */
    public Member modifiedBy(String modifiedBy) {
    	this.modifiedBy = modifiedBy;
    	return this;
    }

	@Override
	public Boolean getDel() {
    	return del;
    }

    /**
	 * 设置逻辑删除，1表示已删除,0表示未删除
	 * 
	 * @param del 逻辑删除，1表示已删除,0表示未删除
	 * @return 当前对象
	 */
    public Member del(Boolean del) {
    	this.del = del;
    	return this;
    }

	@Override
	public String getDelBy() {
    	return delBy;
    }

    /**
	 * 设置
	 * 
	 * @param delBy 
	 * @return 当前对象
	 */
    public Member delBy(String delBy) {
    	this.delBy = delBy;
    	return this;
    }

	@Override
	public LocalDateTime getDelTime() {
    	return delTime;
    }

    /**
	 * 设置
	 * 
	 * @param delTime 
	 * @return 当前对象
	 */
    public Member delTime(LocalDateTime delTime) {
    	this.delTime = delTime;
    	return this;
    }

	public String getWxOpenId() {
		return wxOpenId;
	}

	public void setWxOpenId(String wxOpenId) {
		this.wxOpenId = wxOpenId;
	}

	public String getWxUnionId() {
		return wxUnionId;
	}

	public void setWxUnionId(String wxUnionId) {
		this.wxUnionId = wxUnionId;
	}

	public String getAlipayAppid() {
		return alipayAppid;
	}

	public void setAlipayAppid(String alipayAppid) {
		this.alipayAppid = alipayAppid;
	}

	public String getBusdId() {
		return busdId;
	}

	public void setBusdId(String busdId) {
		this.busdId = busdId;
	}

	public String getLevelName() {
		return levelName;
	}

	public void setLevelName(String levelName) {
		this.levelName = levelName;
	}

	public Integer getMemPoints() {
		return memPoints;
	}

	public void setMemPoints(Integer memPoints) {
		this.memPoints = memPoints;
	}

	public BigDecimal getYueCardCoin() {
		return yueCardCoin;
	}

	public void setYueCardCoin(BigDecimal yueCardCoin) {
		this.yueCardCoin = yueCardCoin;
	}

	public BigDecimal getYueCoin() {
		return yueCoin;
	}

	public void setYueCoin(BigDecimal yueCoin) {
		this.yueCoin = yueCoin;
	}

	public Integer getCouponNum() {
		return couponNum;
	}

	public void setCouponNum(Integer couponNum) {
		this.couponNum = couponNum;
	}

	public Integer getMemberAttribute() {
		return memberAttribute;
	}

	public void setMemberAttribute(Integer memberAttribute) {
		this.memberAttribute = memberAttribute;
	}

	public List<PlateNo> getCarList() {
		return carList;
	}

	public void setCarList(List<PlateNo> carList) {
		this.carList = carList;
	}
	
	public String getVcode() {
		return vcode;
	}

	public void setVcode(String vcode) {
		this.vcode = vcode;
	}

	public Integer getOnlinePoints() {
		return onlinePoints;
	}

	public void setOnlinePoints(Integer onlinePoints) {
		this.onlinePoints = onlinePoints;
	}
	
	public Integer getTotalPoints() {
		return totalPoints;
	}

	public void setTotalPoints(Integer totalPoints) {
		this.totalPoints = totalPoints;
	}

	public Boolean getHasNewMessage() {
		return hasNewMessage;
	}

	public void setHasNewMessage(Boolean hasNewMessage) {
		this.hasNewMessage = hasNewMessage;
	}

}
